Keep the main codebase in container ephemeral storage#2504
Keep the main codebase in container ephemeral storage#2504mcronce wants to merge 2 commits intonextcloud:masterfrom
Conversation
|
This has been open for a while but it would be great if it got more attention It solves a really significant design flaw and anti-pattern that has existed in the Yes, it may impact some setups, but that needs to be addressed eventually. Either with multiple different tags, a pile of new env vars for optional behavior, or the cleanest solution (this PR) which is to just have the image that people see as the "default" nextcloud container behave in a standard, predictable way. |
… storage Signed-off-by: Mike Cronce <mike@quadra-tec.net>
Signed-off-by: Mike Cronce <mike@quadra-tec.net>
containers:
- name: nextcloud
image: docker.io/library/nextcloud:33.0.0-fpm
imagePullPolicy: Always
command: ["php-fpm"]
volumeMounts:
- name: nextcloud-image
mountPath: /var/www/html
subPath: usr/src/nextcloud
readOnly: true
volumes:
- name: nextcloud-image
image:
reference: docker.io/library/nextcloud:33.0.0-fpm
pullPolicy: IfNotPresentThere is a workaround for a cleaner deployment using image volume types but it would still be nice to not even need to do this. At least I don't have to maintain my own images anymore. |
This has several advantages
/var/www/htmlwas cephfs on 2x10Gb network and consumer-grade NVMe drives), updates between 29, 30, 31, and 32 went from ~135 minutes to ~5 minutes. The main culprits for the difference were thersyncstep and the code integrity check.It also may fix #2044; I don't want to speak for the person who originally filed it, but it sounded like they were asking for the same thing.
This is, obviously, a breaking change - anybody currently mounting in all of
/var/www/htmlneeds to now mount in several subdirectories instead. I'm not sure whether the breaking change is preferable over the maintenance burden of having a separate set of images; if a separate set of images is desired, I'll redo it that way. Notably, the helm chart already mounts them all in separately; the only change needed there is to no longer mount in/var/wwwand/var/www/html. I haven't looked for docker-compose files or anything like that.Other than that, I don't believe I broke anything. The example theme and any changed "built-in" config/custom apps will still be copied over when the version changes.